home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 179
/
179.d81
/
pair o' dice
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
7KB
|
236 lines
10 poke56,56:clr:dv=peek(186):ifdv<8ordv>29thendv=8:rem floyd r kirk
12 poke53371,0:poke788,49:tq=ti
14 poke53281,0:poke53280,0:print"[147]":gosub60000
20 sys57812"pair font",dv,0:poke780,0:poke781,0:poke782,56:sys65493
22 fori=0to63:poke14*64+i,0:next:fori=0to21step3:poke14*64+i,255:next
24 vv=53248:poke2040,14:poke2041,14:pokevv+21,0:pokevv,72:pokevv+1,162
26 pokevv+2,128:pokevv+3,162:pokevv+39,1:pokevv+40,1
28 pokevv+16,0:pokevv+29,0:pokevv+23,0:pokevv+27,3
30 dimw(8),s(2),t(2),r(2),u(2),p$(2):n=1
40 dimf(14):fori=0to9:readf(i):next:f2=1
50 dimf1(37):fori=0to14:readf1(i):next
60 dima(12):fori=2to12:reada(i):next
70 dimf3(83):fori=1to83:readf3(i):next
78 ifti<tq+120then78
80 poke53280,15:poke53281,15
90 poke53272,31:print"[144][147]";tab(10);"[208][193][201][210] [207]' [196][201][195][197] [199][193][205][197][211]":gosub900:p=1
92 pokevv+21,3
100 ifn=5then1220
110 ifn=1orn=3thenp$(1)="[208]layer ":p$(2)="[195]omputer":goto130
120 p$(1)="[208]layer 1":p$(2)="[208]layer 2"
130 print"[147]";:s(1)=0:s(2)=0:t(1)=0:t(2)=0:t=p
140 ifn>2thenprinttab(16);"[199][210][197][197][196]":r(1)=0:r(2)=0:u(1)=10:u(2)=10:goto160
150 printtab(17);"[208][201][199]"
160 printp$(1);tab(19);p$(2):print
170 print"[199]ame [211]core: [199]ame [211]core:"
180 print"[212]urn [211]core: [212]urn [211]core:"
190 print"[212]otal: [212]otal:"
200 ifn<3then230
210 print"[198]irst roll: [198]irst roll:"
220 print"[212]urns left: [212]urns left:"
230 print"[215]ins:";tab(19);"[215]ins:"
240 rem r=11:c=0:gosub1230
242 rem forqq=1to6:printtab(3)" ":next
246 r=11:c=0:gosub1230:print
250 printtab(4)"abc[146] abc"
260 printtab(4)"defg[146] defg"
270 printtab(4)"hi?k[146] hi?k"
280 printtab(4)"lmno[146] lmno"
290 r=12:c=25:gosub1230:print"";p$(t);"[144]"
300 if(n=1orn=3)andt=2then330
310 r=14:c=25:gosub1230:print"[198]1[144] [197]nd turn":printtab(25)"[198]7[144] [210]oll dice"
312 printtab(25)"[198]8[144] [205]enu
320 [137]340
330 r[178]14:c[178]25:[141]1230:[153]" ":[153][163]25);" "
332 [153][163]25);" "
340 r[178]5:c[178]12:[141]1230:[153]" cmdcmdcmdcmdcmdcmd";[166]6[171]([195]([196](s(1)))));s(1);
350 [153][163]31);" cmdcmdcmdcmdcmdcmd";[166]6[171]([195]([196](s(2)))));s(2)
360 [153][163]13);" cmdcmdcmdcmdcmd";[166]5[171]([195]([196](t(1)))));t(1);
370 [153][163]32);" cmdcmdcmdcmdcmd";[166]5[171]([195]([196](t(2)))));t(2)
380 [153][163]12);" cmdcmdcmdcmdcmdcmd";[166]6[171]([195]([196](s(1)[170]t(1)))));s(1)[170]t(1);
390 [153][163]31);" cmdcmdcmdcmdcmdcmd";[166]6[171]([195]([196](s(2)[170]t(2)))));s(2)[170]t(2)
400 [139]n[179]3[167]430
410 [153][163]12);" cmdcmdcmd";r(1);[163]31);" cmdcmdcmd";r(2)
420 [153][163]12);" cmdcmdcmd";u(1);[163]31);" cmdcmdcmd";u(2)
430 [153][163]5);w(2[172]n[171]1);[163]24);w(2[172]n)
440 [139]n[179]3[175](s(t)[170]t(t)[177][178]100)[176]n[177]2[175]u(1)[178]0[175]u(2)[178]0[167][141]53370:[137]720
450 [139]n[178]2[176]n[178]4[176]t[178]1[167]570
460 [139]n[178]3[167]490
470 [139]t(t)[179](200[171]s(t))[173]11[167]620
480 [137]530
490 [139]t(t)[178]0[167]620
500 [139]u(1)[178]0[175](s(t)[170]t(t)[177]s(1))[167]530
510 [139]t(t)[179]a(r(t))[167]620
520 [139]u(t)[178]1[175](s(t)[170]t(t)[179][178]s(1))[167]620
530 s(t)[178]s(t)[170]t(t)
540 t(t)[178]0:t[178]3[171]t
550 [139]n[177]2[167]u(3[171]t)[178]u(3[171]t)[171]1:r(1)[178]0:r(2)[178]0
560 [141]52510:[137]290
570 [151]198,0:[151]53370,0
580 [161]a$
590 [139]a$[178]"input"[167]530
592 [139]a$[178][199](140)[167]90
600 [139]a$[178]"let"[167]620
610 [141]870:[137]580
620 d1[178][181]([187](1)[172]6[170]1):d2[178][181]([187](1)[172]6[170]1)
622 [141]52040
630 [151]1590,48[170]d1[170]128:[151]1597,48[170]d2[170]128
640 [139]t[178]1[167]680
650 [151]53370,0:ti$[178]"000000"
660 [139]ti[179]30[167][141]870:[137]660
670 [151]53371,0
680 [139]n[177]2[175]r(t)[178]0[167]r(t)[178]d1[170]d2:t(t)[178]r(t):[137]290
690 t(t)[178]t(t)[170]d1[170]d2:[139]n[179]3[175]d1[178]1[175]d2[178]1[167]s(t)[178]0:[141]1240:[137]540
700 [139]n[179]3[175](d1[178]1[176]d2[178]1)[176]n[177]2[175](d1[170]d2[178]r(t))[167][141]1270:[137]540
710 [137]290
720 [139]n[179]3[167]w(2[172]n[171]2[170]t)[178]w(2[172]n[171]2[170]t)[170]1:r[178]8:[137]770
730 [139]s(1)[177]s(2)[167]w(2[172]n[171]1)[178]w(2[172]n[171]1)[170]1:t[178]1:[137]760
740 [139]s(2)[177]s(1)[167]w(2[172]n)[178]w(2[172]n)[170]1:t[178]2:[137]760
750 t[178]0
760 r[178]10
770 c[178]5:[141]1230:[153]w(2[172]n[171]1);[163]24);w(2[172]n)
780 [139]n[179]3[167][153]:[153]
790 [153]"";[163]25);"asc1stop lenhange game":[153][163]25);"asc7stop (NULL)ame game"
792 [153][163]25)"asc8stop (NULL)uit"
800 p[178]3[171]p:d[178]55000[170]19[172](t[171]1):[151]198,0:[151]53370,0
810 [161]a$
820 [139]a$[178]"let"[167]130
822 [139]a$[178][199](140)[167]1220
830 [139]a$[178]"input"[167][141]52510:[137]90
840 [139]t[178]0[167]810
850 [129]i[178]1[164]83:[151]f3(i)[170]d,f(f2):[130]:f2[178]f2[170]1:[139]f2[178]10[167]f2[178]0
860 [137]810
870 [151]53370,0
880 [129]i[178]0[164]14:[151]f1(i),f(f2):[151]f1(i)[170]7,f(f2):[143] forqq=1to200:next
882 [130]:f2[178]f2[170]1:[139]f2[178]10[167]f2[178]0
890 [142]
900 [151]vv[170]21,0
902 [153]"(NULL)right$chr$stop - atn two-player game, with the first"
910 [153]"to roll a total of 100 or more points"
920 [153]"the winner. (NULL)oll two dice and add up the";
930 [153]"numbers, until you decide to stop or a
940 print"die shows a 1. [193] 1 on one die means you
950 [153]"lose your count for that turn; a double
960 print"1 zeroes your total score. [193]nytime you
970 [153]"show a 1, your turn ends."
980 [153]"chr$(NULL)valvalstr$stop - atn two-player game lasting ten"
990 [153]"turns, with the high scorer at the end"
1000 [153]"being the winner. (NULL)oll two dice and add"
1010 [153]"up the numbers until (a) you decide to
1020 print"stop and save what you have rolled that
1030 [153]"turn, or (b) the dice add up to the
1040 print"number of your first roll of that turn.
1050 [153]"right$f (b), you lose what you rolled that
1060 print"turn and your turn ends."
1070 print"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
1080 print"[221]"tab(21)"[221]"tab(29)"[198]1[144] [195]hange"
1090 print"[221]"tab(21)"[221]"tab(29)"[198]7[144] [196]o it
1092 [153]"/tantantantantantantantantantantantantantantantantantantantanexp"
1100 r[178]21:c[178]8:[141]1230:[139]n[179]3[167][153]" (NULL)right$chr$ stop":[137]1120
1110 [139]n[178]3[176]n[178]4[167][153]"chr$(NULL)valvalstr$stop"
1120 [139]n[178]1[176]n[178]3[167][153]" (NULL)layer vs lenomputer stop":[137]1150
1130 [139]n[178]2[176]n[178]4[167][153]"(NULL)layer 1 vs (NULL)layer 2stop":[137]1150
1140 [153]" (NULL)(NULL)right$(NULL)":[153]" to (NULL)(NULL)atnstr$(NULL)(NULL)atn(NULL)stop "
1150 [151]198,0
1160 [161]a$:[139]a$[178]""[167]1160
1170 [139]a$[178]"let"[167]1210
1180 [139]a$[179][177]"input"[167]1150
1190 n[178]n[170]1:[139]n[178]6[167]n[178]1
1200 [137]1100
1210 [142]
1220 [151]vv[170]21,0:[153]"load":[151]53281,0:[151]53280,0:[137]40000
1230 [151]781,r:[151]782,c:[151]783,0:[158]65520:[142]
1240 r[178]17:c[178]5:[141]1230:[153]"(NULL)h nooooo!":[151]53370,0:ti$[178]"000000"
1242 [141]51170
1250 [139]ti[179]120[167][141]870:[137]1250
1252 [151]1590,63[170]128:[151]1597,63[170]128
1260 [153][163]5);"on ":[151]53371,0:[142]
1270 r[178]17:c[178]3:[141]1230:[153]"peekye-bye, points!":[151]53370,0:ti$[178]"000000"
1272 [141]52340
1280 [139]ti[179]80[167][141]870:[137]1280
1282 [151]1590,63[170]128:[151]1597,63[170]128
1290 [153][163]3);"on ":[151]53371,0:[142]
1300 [131]2,8,7,5,6,4,6,5,7,8
1310 [131]55780,55781,55820,55860,55821,55782
1320 [131]55822,55861,55900,55901,55862,55823,55863,55902,55903
1340 [131]250,123,80,58,44.4,35,42.4,54,74,115,240
1350 [131]696,656,616,697,576,657,576,536,617,698,496,577,658,537,618,699
1360 [131]659,416,497,578,538,619,700,417,498,579,660,539,620,418,499,580
1370 [131]702,419,581,662,622,541,703,663,420,501,542,623,704,664,421,502
1380 [131]543,624,705,665,422,503,625,706,544,666,423,504,545,626,505,546
139